//
//  Base.h

//  xietongbao
//
//  Created by LiuYihua on 2017/3/21.
//  Copyright © 2017年 sbq. All rights reserved.
//

#ifndef Base_h
#define Base_h

// 如果是调试模式(DEBUG 是调试模式下, 自带的宏)
#ifdef DEBUG
#define NSLog( s, ... ) NSLog( @"========<%p %@:(%d)> %@", self, [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )
#else
#define NSLog( s, ... )
#endif

// 打印调用函数的宏
#define HSLogFunc XMGLog(@"%s",__func__);

// 屏幕尺寸相关
#define kScreenBounds [[UIScreen mainScreen] bounds]
#define kDeviceWidth [[UIScreen mainScreen] bounds].size.width
#define kDeviceHeight [[UIScreen mainScreen] bounds].size.height


#define ISIPHONE5s (kDeviceWidth >=320 && kDeviceHeight <375)
#define ISIPHONE6 (kDeviceWidth >=375 && kDeviceHeight <414)
#define ISIPHONE6P (kDeviceWidth >=414)

// 颜色相关
// RGBA颜色
#define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]
// RGB颜色
#define RGBColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
// 随机色
#define RGBRandomColor RGBColor(arc4random_uniform(256), arc4random_uniform(256), arc4random_uniform(256))

////颜色  ! 参数格式为：0xFFFFFF
#define SBQColorWithRGB(rgbValue) \
[UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16)) / 255.0 \
green:((float)((rgbValue & 0xFF00) >> 8)) / 255.0 \
blue:((float)(rgbValue & 0xFF)) / 255.0 alpha:1.0]


// 弱引用
#define kWeakSelf __weak typeof(self) weakSelf = self;


//cell textLabel 字体大小 及正文文字大小
#define CellTextFontSize  [UIFont fontWithName:@"Helvetica" size:16]

//cell DetailTextLabel 字体大小
#define CellDetailTextFontSize  [UIFont fontWithName:@"Helvetica" size:14]

// 导航栏按钮字体及大小
#define ButtonTextFontSize  [UIFont fontWithName:@"Helvetica" size:17]

#define ButtonHeight 44;

//全局字体
#define TextFontSize9   [UIFont fontWithName:@"Helvetica" size:9]
#define TextFontSize10  [UIFont fontWithName:@"Helvetica" size:10]
#define TextFontSize11  [UIFont fontWithName:@"Helvetica" size:11]
#define TextFontSize12  [UIFont fontWithName:@"Helvetica" size:12]
#define TextFontSize13  [UIFont fontWithName:@"Helvetica" size:13]
#define TextFontSize14  [UIFont fontWithName:@"Helvetica" size:14]
#define TextFontSize15  [UIFont fontWithName:@"Helvetica" size:15]
#define TextFontSize16  [UIFont fontWithName:@"Helvetica" size:16]
#define TextFontSize17  [UIFont fontWithName:@"Helvetica" size:17]
#define TextFontSize18  [UIFont fontWithName:@"Helvetica" size:18]
#define TextFontSize20  [UIFont fontWithName:@"Helvetica" size:20]
#define TextFontSize25  [UIFont fontWithName:@"Helvetica" size:25]
#define TextFontSize30  [UIFont fontWithName:@"Helvetica" size:30]


#endif /* Base_h */
